
<!-- 报名信息 -->
<template>
	<view class="container">
		<view class="c-cell" @click="toMineSignUpInfo">
			<u-cell-group>
				<u-cell v-for="item in gameList" :key="item.id" icon="setting-fill" :title="item.match_type_name" :label="item.match_area_group_name + '-' + item.match_round_nums_name" value="已报名" size="large" :data-id="item.id"></u-cell>
			</u-cell-group>
		</view>
		<view class="c-empty" v-if="gameList.length==0">
			<u-empty icon="/static/empty/order.png" text="暂无已报名信息" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name: "",
		data() {
			return {
				// 报名的赛事列表
				gameList:[],
				query:{
					page:1,
					page_size:20
				}
			}
		},
		onLoad() {
			this.getSignUpGameList()
		},
		onReachBottom(){
			this.query.page+=1
			this.getSignUpGameList()
		},
		methods: {
			// 跳转报名详细信息
			toMineSignUpInfo(e){
				if(e.target.dataset.id){
					this.navigateTo(`/pages/pages_mine/public/mineSignUpInfo?id=${e.target.dataset.id}`)
				}
			},
			// 获取报名赛事信息
			getSignUpGameList(){
				this.$http.getSignUpGameList(this.query).then(res=>{
					if(res.data.length){
						this.gameList = this.gameList.concat(res.data)
					}else{
						uni.$u.toast("没有更多了")
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {}
</style>
